<!DOCTYPE html>
<html>
<body>
<template id="target-template">
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="90">
<feTurbulence class="target" />
</svg>
</template>
<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '0',
  from: '1',
  fromComposite: 'add',
  to: '6 11',
  toComposite: 'add',
}, [
  {at: -0.4, is: '-1, -3'},
  {at: 0, is: '1, 1'},
  {at: 0.2, is: '2, 3'},
  {at: 0.6, is: '4, 7'},
  {at: 1, is: '6, 11'},
  {at: 1.4, is: '8, 15'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: '1',
  fromComposite: 'add',
  to: '6 11',
  toComposite: 'add',
}, [
  {at: -0.4, is: '2, 0'},
  {at: 0, is: '4, 4'},
  {at: 0.2, is: '5, 6'},
  {at: 0.6, is: '7, 10'},
  {at: 1, is: '9, 14'},
  {at: 1.4, is: '11, 18'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: '1',
  fromComposite: 'replace',
  to: '6 11',
  toComposite: 'add',
}, [
  {at: -0.4, is: '-2.2, -4.2'},
  {at: 0, is: '1, 1'},
  {at: 0.2, is: '2.6, 3.6'},
  {at: 0.6, is: '5.8, 8.8'},
  {at: 1, is: '9, 14'},
  {at: 1.4, is: '12.2, 19.2'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: neutralKeyframe,
  to: '6 11',
  toComposite: 'replace',
}, [
  {at: -0.4, is: '1.8, -0.2'},
  {at: 0, is: '3, 3'},
  {at: 0.2, is: '3.6, 4.6'},
  {at: 0.6, is: '4.8, 7.8'},
  {at: 1, is: '6, 11'},
  {at: 1.4, is: '7.2, 14.2'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '0',
  from: '-2 10',
  fromComposite: 'add',
  to: '3 10',
  toComposite: 'add',
}, [
  {at: -0.4, is: '-4, 10'},
  {at: 0, is: '-2, 10'},
  {at: 0.2, is: '-1, 10'},
  {at: 0.6, is: '1, 10'},
  {at: 1, is: '3, 10'},
  {at: 1.4, is: '5, 10'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: '-2 10',
  fromComposite: 'add',
  to: '3 10',
  toComposite: 'add',
}, [
  {at: -0.4, is: '-1, 13'},
  {at: 0, is: '1, 13'},
  {at: 0.2, is: '2, 13'},
  {at: 0.6, is: '4, 13'},
  {at: 1, is: '6, 13'},
  {at: 1.4, is: '8, 13'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: '-2 10',
  fromComposite: 'replace',
  to: '3 10',
  toComposite: 'add',
}, [
  {at: -0.4, is: '-5.2, 8.8'},
  {at: 0, is: '-2, 10'},
  {at: 0.2, is: '-0.4, 10.6'},
  {at: 0.6, is: '2.8, 11.8'},
  {at: 1, is: '6, 13'},
  {at: 1.4, is: '9.2, 14.2'},
]);

assertAttributeInterpolation({
  property: 'baseFrequency',
  underlying: '3',
  from: neutralKeyframe,
  to: '3 10',
  toComposite: 'replace',
}, [
  {at: -0.4, is: '3, 0.2'},
  {at: 0, is: '3, 3'},
  {at: 0.2, is: '3, 4.4'},
  {at: 0.6, is: '3, 7.2'},
  {at: 1, is: '3, 10'},
  {at: 1.4, is: '3, 12.8'},
]);
</script>
</body>
</html>
